/**
 * 视频通话 --门诊
 */
import React from 'react';
import { Table, Input, Form, Select, Col, Button, message, Radio, Tooltip, Switch } from 'antd';
import { Util, dayFormat, speech } from 'tools/index';
import { $http } from 'containers/config/https';
import { $loadTemplate } from 'pages/lodop/Common/Print.js';
import ReadCard from 'components/readcard/ReadCard';
import ColumnAuthoritysModel from 'pages/columnAuthority/ColumnAuthoritysModel';
import CommonPagination from 'components/pagination/index';
import RangeDatePicker from 'components/rangePicker/index';
import { PAGE_NUM_MORE_STATUS } from 'tools/statusConstants';
import ShowFaceRecognitionModal from './ShowFaceRecognitionModal';
import { callNumberSocket } from 'tools/callNumber.js';
import ShowReferralModal from './ShowReferralModal';
import moment from 'moment';
import store from 'store';
import '../style/index.less';

const Option = Select.Option;
var mediaStreamTrack;

class OutPatientOfVideoTabPane extends React.Component {
    constructor(props) {
        super(props);
        var userData = JSON.parse(sessionStorage.getItem('userData'));
        var recordData = JSON.parse(sessionStorage.getItem('patientData'));
        if (!recordData) {
            recordData = JSON.parse(sessionStorage.getItem('recordData'));
        }
        this.state = {
            dataSource: [],
            total: 0,
            page: 1,
            pageSize: 200,
            size: 'small',
            curPageDetail: PAGE_NUM_MORE_STATUS[0].code,
            recordData: recordData,
            userData: userData,
            receiveFlag: '1',
            queID: '',
            selectData: {},
            column: [],
            opLocAllPatListFlag: 'N',
            loading: false
        }
    }

    componentWillReceiveProps(nextProp) {
        if (nextProp.isShowModal === true) {
        } else if (this.props.isShow === false) {
            this.cleanInput();
        }
    }

    componentDidMount() {
        this.props.onRef && this.props.onRef(this);
        this.loadData(1);
        this.initData();
        this.loadHeaderData();
        this.loadCardType()
        this.getBindInfo();
        document.querySelector('.ant-table-body').style.height = store.getState().tableHeight.y - 80 + 'px';
        window.addEventListener('focus', this.getBindInfo);
        if (this.state.receiveFlag == '1') {
            this.timer = setInterval(() => this.loadData(1), 60 * 1000)
        }
    }

    componentWillUnmount() {
        // 组件销毁前将静止让setState修改state的状态
        window.removeEventListener('focus', this.getBindInfo);
        if (this.timer) {
            clearInterval(this.timer)
        }
        this.setState = (state, callback) => { return; }
    }

    closeModal(name) {
        let { onHide } = this.props;
        onHide && onHide('isShowOutPatientModal');
        this.cleanInput();
    }

    //清空输入框
    cleanInput() {
        var date = new Date()
        var newDate = date.setMonth(date.getMonth() - 1);
        var dateTime = new Date()
        this.setState({
            ids: [],
            admID: '',
            leftData: [],
            rightData: [],
            admDateFrom: moment(newDate).format(dayFormat),
            admDateTo: moment(dateTime).format(dayFormat)
        })
    }

    initData() {
        let data = {
            params: [{
                compontName: "OutPatientPage",
                type: "C",
                reactCode: ['OutPatientPage']
            }]
        }
        $http.post('urlDeault', this, {
            code: "01040073",
            data: data,
            success: (res) => {
                if (+res.errorCode === 0) {
                    var columns = res.result.C;
                    var dynColumns = []
                    for (var i = 0; i < columns.length; i++) {
                        if (columns[i].dataIndex == 'patName') {
                            dynColumns.push({
                                title: this.state.userData.language == 'EN' ? columns[i].enDescripts : columns[i].title,
                                dataIndex: columns[i].dataIndex,
                                width: parseInt(columns[i].width),
                                align: columns[i].align || 'center',
                                render: (text, data) => {
                                    return <span style={{ color: data.reAdm == 'N' ? '#52c41a' : '' }}>{data.patName}</span>
                                }
                            })
                        } else {
                            dynColumns.push({
                                title: this.state.userData.language == 'EN' ? columns[i].enDescripts : columns[i].title,
                                dataIndex: columns[i].dataIndex,
                                width: parseInt(columns[i].width),
                                align: columns[i].align || 'center'
                            })
                        }
                    }
                    this.setState({
                        column: dynColumns,
                        localeProvider: this.state.userData.language == 'EN' ? res.result.language.EN : res.result.language.CN
                    })
                    this.props.hanlderThis.setState({
                        reload: false,
                    })
                }
            }
        })

    }

    loadData(page, pageSize, e, status) {
        this.setState({ loading: true });
        var date = new Date();
        var params = {
            params: [{
                patCardTypeID: this.props.patCardTypeID,
                patCardNo: this.props.patCardNo,
                flag: this.state.receiveFlag,
                number: this.props.number ? this.props.number : (this.state.number),
                admDateFrom: this.state.admDateFrom ? this.state.admDateFrom : moment(date).format(dayFormat),
                admDateTo: this.state.admDateTo ? this.state.admDateTo : moment(date).format(dayFormat),
                opLocAllPatListFlag: this.state.opLocAllPatListFlag, // 全科标志
            }],
            pagination: [{
                pageSize: this.state.size == 'small' ? this.state.pageSize : PAGE_NUM_MORE_STATUS[0].code,
                currentPage: page
            }]
        }
        $http.post('urlDeault', this, {
            code: this.props.convenience ? '03050264' : "03050004",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.initData()
                    this.setState({
                        loading: false,
                        dataSource: res.result.data,
                        total: res.result.totalCount,
                        rowId: res.result.data && res.result.data.length > 0 ? res.result.data[0].patAdmID : '',
                        page: page,
                        search: e,
                        number: undefined,
                        faceData: res.result.data && res.result.data.length > 0 ? res.result.data[0] : '',
                    }, () => {
                        if (status == 'face' && res.result.data && res.result.data.length > 0) {
                            let patientData = {}
                            patientData = {
                                admID: this.state.faceData.admID,
                                patID: this.state.faceData.patAdmID,
                            }
                            sessionStorage.setItem('patientData', JSON.stringify(patientData));
                            var { loadTitleData } = this.props;
                            loadTitleData && loadTitleData();
                            this.loadGetPatient(res.result.data[0])
                        }
                    })
                } else {
                    this.setState({ loading: false });
                }
            },
            error: function () {
                this.setState({ loading: false });
            }
        });
    }

    loadFaceTitle(status) {
        var params = {
            params: [{
                patID: this.state.faceData.patAdmID,
                admID: this.state.faceData.admID,
                locID: this.state.userData.locID,
                userID: this.state.userData.userID
            }]
        }
        $http.post('urlDeault', this, {
            code: "03050021",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    // sessionStorage.setItem('titleData', JSON.stringify(res.data))
                    this.setState({
                        titleData: res.data,
                        statusNote: !Util.isEmpty(res.data) ? res.data.statusCode : '',
                        statusCode: !Util.isEmpty(res.data) ? res.data.statusCode : '',
                    })
                }
            }
        });
    }

    searchPatientMsg(e) {
        if (e.keyCode == '13') {
            this.loadData(1)
        }
    }

    loadHeaderData() {
        var params = {
            params: [{}]
        }
        $http.post('urlDeault', this, {
            code: "03050005",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        sumData: res.data
                    })
                }
            }
        });
    }

    //获取卡类型
    loadCardType() {
        var params = {
            params: [{
                cardTypeFlag: '1',//卡类型
            }]
        }
        $http.post('urlDeault', this, {
            code: "03030005",
            data: params,
            success: function (res) {
                var cardStatus = '', replaceZero = '', cardLength = '', readMode = ''
                if (res.errorCode == '0') {
                    if (res.cardType && res.cardType.length > 0) {
                        var cardType = res.cardType;
                        for (var i = 0; i < cardType.length; i++) {
                            if (cardType[i].defaultFlag == 'Y') {
                                cardStatus = cardType[i].id,
                                    replaceZero = cardType[i].replenishZero
                                cardLength = cardType[i].cardLength
                                readMode = cardType[i].readMode
                            }
                        }
                    }
                    this.setState({
                        cardTypeData: res.cardType,
                        cardStatus: cardStatus,
                        readMode: readMode,
                        cardLength: cardLength,
                        replaceZero: replaceZero,
                        selectData: res?.result || {}
                    })
                }
            }
        });
    }

    getBindInfo = () => {
        let data = {
            params: [{
                userID: this.state.userData?.userID || '',
                hospID: this.state.userData?.hospID || '',
                purCode: "",
            }]
        }
        $http.post('urlDeault', this, {
            code: "04150007",
            data: data,
            success: (res) => {
                if (res.errorCode == '0') {
                    if (res.result.serverIP != undefined) {
                        callNumberSocket.init(res.result.serverIP, res.result.serverPort);
                        this.setState({
                            bindInfo: res.result,
                        })
                    }
                }
            }
        })
    }

    //叫号
    loadCallNum() {
        console.log("outV");
        this.setState({
            disCallNum: true
        })
        var params = {
            params: [{
                locID: this.state.userData.locID,
                userID: this.state.userData.userID,
                docID: this.state.userData.userID,
                admID: !Util.isEmpty(this.state.record) ? this.state.record.admID : undefined
            }]
        }
        $http.post('urlDeault', this, {
            code: "03050006",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        disCallNum: false
                    })
                    // message.success('叫号成功')
                    message.success(this.setMessage('OutPatientPageCalled', 'descripts'), this.state.userData && this.state.userData.messageTime)
                    this.loadData()
                    speech.speechSynthesis(res.result, callNumberSocket.sendMsg)
                } else {
                    this.setState({
                        disCallNum: false
                    })
                }
            }
        });
    }

    //过号
    loadPassNum() {
        this.setState({ disPassNum: true })
        var params = {
            params: [{
                locID: this.state.userData.locID,
                userID: this.state.userData.userID,
                docID: this.state.userData.userID,
                admID: !Util.isEmpty(this.state.record) ? this.state.record.admID : undefined
            }]
        }
        $http.post('urlDeault', this, {
            code: "03050007",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({ disPassNum: false })
                    // message.success('过号成功')
                    message.success(this.setMessage('OutPatientPageOperation', 'descripts'), this.state.userData && this.state.userData.messageTime)
                    this.loadData()
                } else {
                    this.setState({ disPassNum: false })
                }
            }
        });
    }

    // 一键退号
    oneClickBack = Util.debounce(() => {
        var params = {
            params: [{
                locID: this.state.userData.locID,
                userID: this.state.userData.userID,
                docID: this.state.userData.userID,
                admID: !Util.isEmpty(this.state.record) ? this.state.record.admID : undefined
            }]
        }
        $http.post('urlDeault', this, {
            code: "03050279",
            data: params,
            success: function (res) {
                if (+res.errorCode === 0) {
                    message.success(res.errorMessage, this.state.userData && this.state.userData.messageTime);
                    this.loadData();
                }
            }
        });
    })

    startChange(date) {
        this.setState({
            admDateFrom: date,
        }, () => {
            this.loadData(1)
        })
    }

    endChange(date) {
        this.setState({
            admDateTo: date,
        }, () => {
            this.loadData(1)
        })
    }

    //分页切换
    onChange(e) {
        this.setState({ page: e }, () => {
            this.loadData(e);
        });
    }

    //分页切换
    changePageSize(current, pageSize) {
        this.setState({ pageSize: pageSize, page: current }, () => {
            this.loadData(current, pageSize);
        });
    }

    //接诊
    loadGetPatient(record) {
        // sessionStorage.setItem('recordData', JSON.stringify(record))
        var params = {
            params: [{
                patAdmID: record.patAdmID,
            }]
        }
        $http.post('urlDeault', this, {
            code: "03050010",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    // message.success('接诊成功')
                    this.loadData(1)
                    this.loadPatientMsg(record)
                }
            }
        });
    }


    loadPatientMsg(record) {
        var params = {
            params: [{
                patID: record.patID,
                admID: record.id,
                locID: this.state.userData.locID,
                userID: this.state.userData.userID
            }]
        }
        $http.post('urlDeault', this, {
            code: "03050021",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    sessionStorage.setItem('titleData', JSON.stringify(res.data))
                    this.setState({
                        titleData: res.data,
                    }, () => {
                        var { loadPatientMsg } = this.props;
                        loadPatientMsg && loadPatientMsg(res.data, record)

                    }
                    )
                }
            }
        });
    }

    //点击行，渲染当前行样式
    onClickRow = (record) => {
        return {
            onDoubleClick: () => {
                this.setState({
                    patAdmID: record.patAdmID
                });
                this.loadGetPatient(record)
            },
            onClick: () => {
                var patientData = {}
                patientData = {
                    admID: record.admID,
                    patID: record.patID
                }
                sessionStorage.setItem('patientData', JSON.stringify(patientData))
                this.setState({
                    rowId: record.patAdmID,
                    record: record,
                    regQueID: record.regQueID
                }, () => {
                    var { loadTitleData } = this.props;
                    loadTitleData && loadTitleData()
                })
            },
            onKeyDown: () => {
                this.setState({
                    patAdmID: record.patAdmID
                });
                this.loadGetPatient(record)
            }
        };
    }

    //提交
    onSubmit() {
        // let { onSubmit } = this.props;

        // onSubmit && onSubmit(admID, ids);
        this.loadGetPatient(this.state.record)
    }

    //点击行，渲染当前行样式
    setRowClassName = (record) => {
        return record.patAdmID === this.state.rowId ? 'clickRowStyle' : '';
    }

    commonCheckbox(name, e) {
        this.setState({
            [name]: e
        }, () => {
            this.loadData(1, '', 'search')
        })
    }

    handleReadCard() {
        var cardType = this.state.patCardTypeID ? this.state.patCardTypeID : (this.state.cardStatus);
        this.readCard.ReadCard(cardType, "R", (json) => {
            this.setState({ readPatID: json && json.patInfo ? json.patInfo.patID : '', patCardNo: json.cardNo, readStatus: 'read' }, () => {
                this.loadData()
            })
        })
    }

    onColumnRef = (ref) => {
        this.columnRef = ref;
    }

    //国际化
    setMessage(name, message) {
        return this.state.localeProvider && this.state.localeProvider[name] ? this.state.localeProvider[name][message] : ''
    }

    loadKeyDown(e) {
        if (e.keyCode == '13') {
            this.setState({//自动补0，渲染到组件中
                patCardNo: this.state.replaceZero == 'Y' ? (Array(parseInt(this.state.cardLength)).join(0) + this.state.patCardNo).slice(-parseInt(this.state.cardLength)) : this.state.patCardNo
            }, () => {
                this.loadData(1)
            })
        }
    }

    //切换卡类型
    changeCardType(name, e) {
        var { cardTypeData } = this.state;
        for (var i = 0; i < cardTypeData.length; i++) {
            if (e == cardTypeData[i].id) {
                this.setState({
                    cardLength: cardTypeData[i].cardLength,
                    replaceZero: cardTypeData[i].replenishZero,
                    cardTypeId: cardTypeData[i].id,
                    readMode: cardTypeData[i].readMode,
                    [name]: e,
                    inputStatus: true
                })
            }
        }
    }

    loadVideoCall() {
        this.setState({
            isShowVideoCallModal: true
        })
    }

    hideModal(name) {
        this.setState({
            [name]: false
        })
        if (mediaStreamTrack) {
            mediaStreamTrack.getTracks()[0].stop(); //关闭摄像头
        }
    }

    handleChangeReceive(e) {
        this.setState({
            receiveFlag: e.target.value
        }, () => {
            this.loadData(1)
        })
    }

    //人脸识别
    handleShowFaceRecognition() {
        try {
            var that = this;
            // 获取用户媒体,包含视频和音频
            navigator.mediaDevices.getUserMedia({ video: true })
                .then(stream => {
                    that.setState({ isShowFaceRecognitionModal: true }, () => {
                        var { clearData } = that.props;
                        clearData && clearData()
                    })
                    mediaStreamTrack = stream; // 将捕获的视频流传递给video  放弃window.URL.createObjectURL(stream)的使用

                }).catch(error => {
                    message.error('当前系统未检测到您的摄像头，请检查设备是否正常开启！')
                });
        } catch (error) {
            message.error("当前浏览器没有摄像头权限，请先授权。")
        }
    }

    onRef = ref => {
        this.onFace = ref
    }

    loadCallBackMsg(data) {
        this.setState({
            number: data
        }, () => {
            var { clearData } = this.props;
            clearData && clearData(data)
            this.loadData(1, '', '', 'face')
        })
    }

    //转诊
    handleReferralModal() {
        this.setState({
            isShowReferralModal: true
        })
    }

    //提交转诊
    handleSubmitReferral(data) {
        // console.log(this.state.rowId, "admID")
        // console.log(this.state.regQueID, "regQueID")
        var params = {
            params: [{
                admID: this.state.rowId,
                admLocID: data.locID,
                admDocID: data.docID,
                workID: data.resDetailID,
                userID: this.state.userData.userID,
                queID: this.state.regQueID,
            }]
        }
        $http.post('urlDeault', this, {
            code: "03040042",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    message.success('转诊成功！')
                    this.hideModal('isShowReferralModal')
                    this.loadData()
                }
            }
        });
    }

    // 腕带打印
    handleWristbandPrint = async (record, e) => {
        try {
            React.$stopPropagation(e);
            let data = {
                params: [{
                    admID: record?.admID || '',
                    bedID: record?.bedID || '',
                }]
            }
            let res = await React.$asyncPost(this, '04140013', data);
            $loadTemplate(record?.templateCode || 'WristbandOP', res.result);
        } catch (error) {
            console.log(error)
        }
    }

    // 全科Swicth切换
    handleQKSwitchChange = (e) => {
        this.setState({ opLocAllPatListFlag: e ? 'Y' : 'N' }, () => {
            this.loadData(1)
        })
    }

    render() {
        const { column, opLocAllPatListFlag, selectData, loading } = this.state;

        // 列表操作 / 该功能移至手术查询了
        // const operationObj = {
        //     width: 86,
        //     title: '操作',
        //     align: 'center',
        //     key: 'operation',
        //     fixed: 'right',
        //     render: (text, record) => (
        //         <>
        //             <span className="span" onClick={(e) => this.handleWristbandPrint(record, e)}>
        //                 腕带打印
        //             </span>
        //         </>
        //     ),
        // };
        var date = new Date();

        //卡类型
        let cardTypeOption = []
        this.state.cardTypeData && this.state.cardTypeData.map((item, index) => {
            cardTypeOption.push(<Option key={index} value={item.id}>
                <Tooltip title={this.state.userData.language == 'EN' ? item.enDescripts : item.descripts}>
                    {this.state.userData.language == 'EN' ? item.enDescripts : item.descripts}</Tooltip></Option>)
        })

        return <div style={{ background: '#F5F7FE' }} className='outpatient-body'>
            <div>
                {/**读卡 */}
                <ReadCard ref={ref => this.readCard = ref}></ReadCard>
                <ColumnAuthoritysModel
                    clientWidth='800px'
                    compontName="OutPatientPage"
                    configType="C"
                    onRef={this.onColumnRef}
                    reloadData={this.initData}
                />

                {/**人脸识别 */}
                <ShowFaceRecognitionModal isShow={this.state.isShowFaceRecognitionModal}
                    businessCode='002' onRef={this.onRef}
                    onSubmit={this.loadCallBackMsg.bind(this)}
                    onHide={this.hideModal.bind(this, 'isShowFaceRecognitionModal')}>
                </ShowFaceRecognitionModal>

                <ShowReferralModal isShow={this.state.isShowReferralModal}
                    onHide={this.hideModal.bind(this, 'isShowReferralModal')}
                    onSubmit={this.handleSubmitReferral.bind(this)}>
                </ShowReferralModal>

                <div>
                    <Table
                        loading={loading}
                        columns={column}
                        style={{ background: 'white', height: store.getState().tableHeight.y + 16 + 'px' }}
                        dataSource={this.state.dataSource}
                        loadData={this.loadData.bind(this)}
                        onRow={this.onClickRow} bordered
                        rowClassName={this.setRowClassName}
                        title={() => {
                            return (<div className="flex-align-items" style={{ marginTop: 5 }}>
                                <Col span={6}>
                                    <Input.Group style={{ display: 'flex' }}>
                                        <div style={{ width: '37%' }}>
                                            <Input className='express-input-disables' style={{ width: '100%' }}
                                                value={'问诊日期：'} disabled />
                                        </div>
                                        <div>
                                            <RangeDatePicker label={''} format='YYYY-MM-DD' width={'100%'}
                                                locale={this.state.userData.language} className='express-select-border'
                                                startDate={moment(date).format(dayFormat)} endDate={moment(date).format(dayFormat)}
                                                startChange={this.startChange.bind(this)} endChange={this.endChange.bind(this)} />
                                        </div>
                                    </Input.Group>
                                    {/* <RangeDatePicker label={this.setMessage('OutPatientPagetime', 'descripts')} format='YYYY-MM-DD' width={300}
                                        locale={this.state.userData.language}
                                        startDate={moment(date).format(dayFormat)} endDate={moment(date).format(dayFormat)}
                                        startChange={this.startChange.bind(this)} endChange={this.endChange.bind(this)} /> */}
                                </Col>
                                {selectData?.opLocAllPatListFlag === 'Y' ? (
                                    <div style={{ marginLeft: 10 }}>
                                        全科：<Switch checkedChildren="是" unCheckedChildren="否" checked={opLocAllPatListFlag === 'Y' ? true : false} onChange={this.handleQKSwitchChange} />
                                    </div>
                                ) : ''}
                                <Col span={2} style={{ marginLeft: 10 }}>
                                    <Button className='register-saveButton' type='primary' onClick={this.loadData.bind(this, 1, '', 'search')}>
                                        {this.setMessage('OutPatientPagesearch', 'descripts')}</Button>
                                </Col>

                                <div>
                                    {this.props.convenience ? null : <span>
                                        <Button style={{ background: '#1890ff', color: 'white' }} className='patient-saveButton'
                                            onClick={this.handleShowFaceRecognition.bind(this)}>人脸识别</Button>
                                        <Radio.Group onChange={this.handleChangeReceive.bind(this)} buttonStyle="solid" value={this.state.receiveFlag}>
                                            <Radio.Button value="3">就诊完成</Radio.Button>
                                            <Radio.Button value="2">就诊中</Radio.Button>
                                            <Radio.Button value="1">未就诊</Radio.Button>
                                        </Radio.Group>
                                        <Button style={{ background: '#1999db', color: 'white', marginLeft: 24 }} className='patient-saveButton'
                                            disabled={this.state.disCallNum}
                                            onClick={this.loadCallNum.bind(this)}>{this.setMessage('OutPatientPageCall', 'descripts')}</Button>
                                        {/* <Button style={{ background: '#FA8C16', color: 'white' }} className='patient-saveButton'
                                            onClick={this.loadData.bind(this, 1, '')}>{this.setMessage('OutPatientPageReCall', 'descripts')}</Button> */}
                                        <Button style={{ background: '#13C2C2', color: 'white', marginLeft: 10 }} className='patient-saveButton'
                                            disabled={this.disPassNum}
                                            onClick={this.loadPassNum.bind(this)}>{this.setMessage('OutPatientPagePassNo', 'descripts')}</Button>
                                        {/* 一键退号 */}
                                        <Button style={{ background: this.state.record && this.state.record.admID ? "#fab926" : '#f5f5f5', color: this.state.record && this.state.record.admID ? 'white' : "rgba(0, 0, 0, 0.25)", marginLeft: 10 }} className='patient-saveButton'
                                            onClick={this.oneClickBack} disabled={this.state.record && this.state.record.admID ? false : true}>一键退号</Button>
                                        <Button disabled={this.state.record && this.state.record.admID ? false : true}
                                            type={"primary"} style={{ marginLeft: 10, marginRight: 10 }}
                                            onClick={this.handleReferralModal.bind(this)}
                                        >转诊</Button>
                                    </span>}

                                </div>
                            </div>)
                        }}
                        rowKey={(data) => {
                            return data.patAdmID
                        }}
                        // scroll={{ y: store.getState().tableHeight.y + 'px' }}
                        scroll={{ y: store.getState().tableHeight.y - 80 + 'px' }}
                        onHeaderRow={column => {
                            return {
                                onDoubleClick: () => {
                                    this.columnRef.onOpenModel();
                                },
                            };
                        }}

                        pagination={false}>
                    </Table>
                    <CommonPagination
                        current={this.state.page}
                        total={this.state.total}
                        search={this.state.search}
                        pageSize='200'
                        size='large'
                        onShowSizeChange={this.changePageSize.bind(this)} complete={true} dataSource={this.state.dataSource}
                        onChange={this.onChange.bind(this)} />
                </div>
            </div>
        </div>
    }
};

export default Form.create()(OutPatientOfVideoTabPane);
